<template>
  <div class="employees-container">
    <div class="app-container">
      <el-card>
        <el-tabs>
          <el-tab-pane label="登录账户设置">
            <LoginSet :user-detail="userDetail" />
          </el-tab-pane>
          <el-tab-pane label="个人详情">
            <UserInfo :user-detail="userDetail" />
            <el-tab-pane />
          </el-tab-pane>
        </el-tabs>
      </el-card>
    </div>
  </div>
</template>

<script>
import { getUserDetailByIdAPI } from '@/api/user.js'
import LoginSet from './components/login-setting.vue'
import UserInfo from './components/user-info.vue'
export default {
  components: {
    LoginSet,
    UserInfo
  },
  data () {
    return {
      userDetail: {}
    }
  },
  created () {
    this.getUser()
  },
  methods: {
    async getUser () {
      const res = await getUserDetailByIdAPI(this.$route.params.id)
      // console.log('shijia', res)
      this.userDetail = res
    }
  }
}
</script>

<style>
</style>
